/**

var singup = document.getElementById('signup');
signup.onclick = function() {
	window.open('signup.html','popup', 'width=435, height=760')
}
*/

$(function() {
	
	var img_arr=new Array();
	var i=0;

	img_arr[0]="url(./img/indexbg1.jpg)";
	img_arr[1]="url(./img/indexbg2.jpg)";
	img_arr[2]="url(./img/indexbg3.jpg)"; 
	imgStart();

	function imgStart(){
	  setInterval(imgChange, 3000);
	}

	function imgChange(){

	  //$(".bg_index").fadeOut(1000);
	  $(".bg_index").css("background-image", img_arr[i]);
	  $(".bg_index").fadeIn(1000);
	  i++;
	  if (i==3) {
	    i=0;
	  }
	  return i;

	}
	
	function signup() {
		//var getid = arguments;
		$(".bg_index").fadeOut(1000);
		location.href("./signup.html");
	}
	
	function login() {
		$(".bg_index").fadeOut(1000);
		location.href("./login.html");
	}
	//$(".popup_signup").hide();
	//$(".popup_login").hide();
	$(".btn_signup_index").on("click", signup);
	$(".btn_login_index").on("click", login);
});